<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>

	<table id="tbl">
		
	</table>
	
	<script type="text/javascript">
		
	var users = [
		{name:"张三",age:18,sex:'男'},
		{name:"张卫红",age:58,sex:'女'},
		{name:"张二狗",age:22,sex:'男'},
		{name:"张春华",age:35,sex:'女'},
		{name:"张小明",age:12,sex:'男'},
		{name:"张新发",age:24,sex:'男'},
	];

	var tbl = document.getElementById("tbl");


	var str = `
		<tr>
		<th>姓名</th>
		<th>年龄</th>
		<th>性别</th>
		<th>生肖</th>
		</tr>
	`;

	var shengxiao =  [ "狗","鸡", "猴", "羊", "马", "蛇", "龙", "兔", "虎", "牛", "鼠", "猪"];
	var sz = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"];


	var szs = "14321431246433543";
	for(var i in szs){
		console.log(sz[szs[i]*1]);
	}


	for(var i in users){
		str += `
			<tr>
			<td>${users[i].name}</td>
			<td>${users[i].age}</td>
			<td>${users[i].sex}</td>
			<td>${shengxiao[users[i].age%12]}</td>
			</tr>
		`;
	}
	tbl.innerHTML += str;

	Date.prototype.toString = function () {
		return this.getFullYear()+"-"+(this.getMonth()+1)+"-"+this.getDate()+" "+this.getHours()+":"+this.getMinutes()+":"+this.getSeconds();
	}

	setInterval(function () {
		document.title= (new Date()).toString();
	},1000);

	</script>
</body>
</html>